import { zrRequest } from "./index"

export function addOrder(data) {
  return zrRequest.post({
    url: "detect/order",
    data
  })
}

export function queryUserOrder(data) {
  let queryInfo = data
  queryInfo.pageSize = 1000
  queryInfo.pageNum = 1
  return zrRequest.post({
    url: "detect/order/listUserOrder",
    data: queryInfo
  })
}

// 作废订单
export function cancelOrder(data){
  return zrRequest.post({
    url: "detect/order/cancelOrder",
    data
  })
}

export function queryOrderById(id) {
  return zrRequest.get({
    url: `detect/order/${id}`
  })
}

export function editOrder(data) {
  return zrRequest.put({
    url: "detect/order",
    data
  })
}


